Optimal. Leaf size=67 \[ -\frac{1}{2} \left (\frac{c^2}{a^2}-\frac{d^2}{b^2}\right ) \log \left (a+b x^2\right )+\frac{c^2 \log (x)}{a^2}+\frac{(b c-a d)^2}{2 a b^2 \left (a+b x^2\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0646807, antiderivative size = 67, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 22, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.091, Rules used = {446, 88} \[ -\frac{1}{2} \left (\frac{c^2}{a^2}-\frac{d^2}{b^2}\right ) \log \left (a+b x^2\right )+\frac{c^2 \log (x)}{a^2}+\frac{(b c-a d)^2}{2 a b^2 \left (a+b x^2\right )} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 446
Rule 88
Rubi steps
\begin{align*} \int \frac{\left (c+d x^2\right )^2}{x \left (a+b x^2\right )^2} \, dx &=\frac{1}{2} \operatorname{Subst}\left (\int \frac{(c+d x)^2}{x (a+b x)^2} \, dx,x,x^2\right )\\ &=\frac{1}{2} \operatorname{Subst}\left (\int \left (\frac{c^2}{a^2 x}-\frac{(-b c+a d)^2}{a b (a+b x)^2}+\frac{-b^2 c^2+a^2 d^2}{a^2 b (a+b x)}\right ) \, dx,x,x^2\right )\\ &=\frac{(b c-a d)^2}{2 a b^2 \left (a+b x^2\right )}+\frac{c^2 \log (x)}{a^2}-\frac{1}{2} \left (\frac{c^2}{a^2}-\frac{d^2}{b^2}\right ) \log \left (a+b x^2\right )\\ \end{align*}
Mathematica [A] time = 0.0428798, size = 70, normalized size = 1.04 \[ \frac{\frac{(a d-b c) \left (\left (a+b x^2\right ) (a d+b c) \log \left (a+b x^2\right )+a (a d-b c)\right )}{b^2 \left (a+b x^2\right )}+2 c^2 \log (x)}{2 a^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.011, size = 94, normalized size = 1.4 \begin{align*}{\frac{{c}^{2}\ln \left ( x \right ) }{{a}^{2}}}+{\frac{\ln \left ( b{x}^{2}+a \right ){d}^{2}}{2\,{b}^{2}}}-{\frac{\ln \left ( b{x}^{2}+a \right ){c}^{2}}{2\,{a}^{2}}}+{\frac{a{d}^{2}}{2\,{b}^{2} \left ( b{x}^{2}+a \right ) }}-{\frac{cd}{b \left ( b{x}^{2}+a \right ) }}+{\frac{{c}^{2}}{2\,a \left ( b{x}^{2}+a \right ) }} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.04862, size = 116, normalized size = 1.73 \begin{align*} \frac{c^{2} \log \left (x^{2}\right )}{2 \, a^{2}} + \frac{b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}}{2 \,{\left (a b^{3} x^{2} + a^{2} b^{2}\right )}} - \frac{{\left (b^{2} c^{2} - a^{2} d^{2}\right )} \log \left (b x^{2} + a\right )}{2 \, a^{2} b^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.55434, size = 228, normalized size = 3.4 \begin{align*} \frac{a b^{2} c^{2} - 2 \, a^{2} b c d + a^{3} d^{2} -{\left (a b^{2} c^{2} - a^{3} d^{2} +{\left (b^{3} c^{2} - a^{2} b d^{2}\right )} x^{2}\right )} \log \left (b x^{2} + a\right ) + 2 \,{\left (b^{3} c^{2} x^{2} + a b^{2} c^{2}\right )} \log \left (x\right )}{2 \,{\left (a^{2} b^{3} x^{2} + a^{3} b^{2}\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 1.37925, size = 80, normalized size = 1.19 \begin{align*} \frac{a^{2} d^{2} - 2 a b c d + b^{2} c^{2}}{2 a^{2} b^{2} + 2 a b^{3} x^{2}} + \frac{c^{2} \log{\left (x \right )}}{a^{2}} + \frac{\left (a d - b c\right ) \left (a d + b c\right ) \log{\left (\frac{a}{b} + x^{2} \right )}}{2 a^{2} b^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.15932, size = 134, normalized size = 2. \begin{align*} \frac{c^{2} \log \left (x^{2}\right )}{2 \, a^{2}} - \frac{{\left (b^{2} c^{2} - a^{2} d^{2}\right )} \log \left ({\left | b x^{2} + a \right |}\right )}{2 \, a^{2} b^{2}} + \frac{b^{2} c^{2} x^{2} - a^{2} d^{2} x^{2} + 2 \, a b c^{2} - 2 \, a^{2} c d}{2 \,{\left (b x^{2} + a\right )} a^{2} b} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]